package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysProjectTenderModeMapper;
import com.ruoyi.system.domain.SysProjectTenderMode;
import com.ruoyi.system.service.ISysProjectTenderModeService;

/**
 * 招标方式Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-03
 */
@Service
public class SysProjectTenderModeServiceImpl implements ISysProjectTenderModeService 
{
    @Autowired
    private SysProjectTenderModeMapper sysProjectTenderModeMapper;

    /**
     * 查询招标方式
     * 
     * @param id 招标方式主键
     * @return 招标方式
     */
    @Override
    public SysProjectTenderMode selectSysProjectTenderModeById(Long id)
    {
        return sysProjectTenderModeMapper.selectSysProjectTenderModeById(id);
    }

    /**
     * 查询招标方式
     *
     * @param name 招标方式name
     * @return 招标方式
     */
    @Override
    public SysProjectTenderMode selectSysProjectTenderModeByName(String name)
    {
        return sysProjectTenderModeMapper.selectSysProjectTenderModeByName(name);
    }

    /**
     * 查询招标方式列表
     * 
     * @param sysProjectTenderMode 招标方式
     * @return 招标方式
     */
    @Override
    public List<SysProjectTenderMode> selectSysProjectTenderModeList(SysProjectTenderMode sysProjectTenderMode)
    {
        return sysProjectTenderModeMapper.selectSysProjectTenderModeList(sysProjectTenderMode);
    }

    /**
     * 新增招标方式
     * 
     * @param sysProjectTenderMode 招标方式
     * @return 结果
     */
    @Override
    public int insertSysProjectTenderMode(SysProjectTenderMode sysProjectTenderMode)
    {
        sysProjectTenderMode.setCreateTime(DateUtils.getNowDate());
        return sysProjectTenderModeMapper.insertSysProjectTenderMode(sysProjectTenderMode);
    }

    /**
     * 修改招标方式
     * 
     * @param sysProjectTenderMode 招标方式
     * @return 结果
     */
    @Override
    public int updateSysProjectTenderMode(SysProjectTenderMode sysProjectTenderMode)
    {
        sysProjectTenderMode.setUpdateTime(DateUtils.getNowDate());
        return sysProjectTenderModeMapper.updateSysProjectTenderMode(sysProjectTenderMode);
    }

    /**
     * 批量删除招标方式
     * 
     * @param ids 需要删除的招标方式主键
     * @return 结果
     */
    @Override
    public int deleteSysProjectTenderModeByIds(Long[] ids)
    {
        return sysProjectTenderModeMapper.deleteSysProjectTenderModeByIds(ids);
    }

    /**
     * 删除招标方式信息
     * 
     * @param id 招标方式主键
     * @return 结果
     */
    @Override
    public int deleteSysProjectTenderModeById(Long id)
    {
        return sysProjectTenderModeMapper.deleteSysProjectTenderModeById(id);
    }
}
